package com.mdxx.xczd.manager;

import java.util.concurrent.ExecutionException;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;

/**
 * Created by MD-02 on 2017/5/9.
 */

public class GetNetTime {

    public static long getTime(){
        long aLong = 0;
        DaizeCall task = new DaizeCall();
        ExecutorService executorService = Executors.newFixedThreadPool(1);
        Future<Long> submit = executorService.submit(task);
        try {
           aLong = submit.get();
        } catch (InterruptedException e) {
            e.printStackTrace();
        } catch (ExecutionException e) {
            e.printStackTrace();
        }
    return aLong;
    }
}
